package com.lkm.app_ui.m.Imple.hsj522;




public class HSJ800Help {


    public static byte crc(byte seqnr,byte cmdstute , byte[] data) {






        byte temp = 0x00;
        for (int i = 0; i < data.length; i++) {
            temp = (byte) (temp ^ data[ i]);
        }

        return  (byte) ~(seqnr ^ cmdstute
                ^ data.length ^ temp);

    }



    public static int getBlockNum(int sector,int index){
        return (4*(sector-1))+index;
    }
}
